package com.beone.smart.smartBeauty.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.beone.smart.smartBeauty.model.dto.ShopCarGoodsDto;
import com.beone.smart.smartBeauty.model.entity.ShopCarDo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ShopCarMapper extends BaseMapper<ShopCarDo> {
    @Select("SELECT sc.*,g.imgUrl,g.title,g.inventory from shop_car as sc LEFT JOIN goods as  g ON sc.goodsId=g.id where sc.userId=#{uid}")
    List<ShopCarGoodsDto> getList(String uid);
}
